package com.pay.game.central.web.service;

import com.pay.game.central.web.bean.OrderStatistic;
import com.pay.game.central.web.bean.PayStatistic;
import com.pay.game.central.web.mapper.StatisticMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 信息统计
 */
@Service
public class StatisticService {

    @Autowired
    private StatisticMapper statisticMapper;

    public void insertOrderStatistic(OrderStatistic orderStatistic){
        statisticMapper.insertOrderStatistic(orderStatistic);
    }

    public void insertPayStatistic(PayStatistic payStatistic){
        statisticMapper.insertPayStatistic(payStatistic);
    }

    public int countTodayOrderByUserId(String userId, String date){
        return statisticMapper.countTodayOrderByUserId(userId, date);
    }

    public int countTodayPayByUserId( String userId, String date){
        return statisticMapper.countTodayPayByUserId(userId, date);
    }


}
